<?php
class dbservice {
    private static $instance;
    private static $db; 
    private $filepath = "dbconfig.txt";
    
    private function __construct(){
        self::$db = new PDO("mysql:host=127.0.0.1;dbname=capstone","root","apmsetup");
    }
    public static function getInstance(){
        if(!isset(self::$instance)) {
            self::$instance = new dbservice();
        }
        return self::$instance;
    }
    public function sendquery($query) {
        $result = self::$db->query($query);
        return $result;
    }
    private function initFromFile(){
            
    }
}
?>